{% extends 'usersinfo_base.html' %}

{% load staticfiles %}

{% block title %} 在线学习网登录 {% endblock %}

{% block body %}
<section>
    <div class="c-box bg-box">
        <div class="login-box clearfix">
            <div class="hd-login clearfix">
                <a class="index-logo" href="{% url 'index' %}"></a>
                <h1>用户登录</h1>
                <a class="index-font" href="{% url 'index' %}">回到首页</a>
            </div>
            <div class="fl slide">
                <div class="imgslide">
                    <ul class="imgs">
                            <li><a href=""><img width="483" height="472" src="{% static 'images/mysql.jpg' %}" /></a></li>
                            <li><a href=""><img width="483" height="472" src="{% static 'images/mysql.jpg' %}" /></a></li>
                            <li><a href=""><img width="483" height="472" src="{% static 'images/mysql.jpg' %}" /></a></li>
                    </ul>
                </div>
                <div class="unslider-arrow prev"></div>
                <div class="unslider-arrow next"></div>
            </div>
            <div class="fl form-box">
                {% if pwdreset_msg %}
                <h2>{{ pwdreset_msg }}</h2>
                {% else %}
                <h2>帐号登录</h2>
                {% endif %}
                <form action="{% url 'users:login' %}" method="post" autocomplete="off">
                    <div class="form-group marb20 {% if login_form.username.value %} errorput {% endif %}">
                        <label>用&nbsp;户&nbsp;名</label>
{#                        <input name="username" id="username" type="text" value="{{ login_form.username.value }}" placeholder="邮箱" />#}
                        <input name="username" id="username" type="text" value="" placeholder="请输入您的邮箱地址" />
                    </div>
                    <div class="form-group marb8 {% if login_form.password.value %} errorput {% endif %}">
                        <label>密&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;码</label>
{#                        <input name="password" id="password_l" type="password" value="{{ login_form.password.value }}" placeholder="请输入您的密码" />#}
                        <input name="password" id="password_l" type="password" value="" placeholder="请输入您的密码" />
                    </div>
                    <div class="error btns login-form-tips" id="jsLoginTips">
                        {% if login_form.errors.items %}
                            {% for key,error in login_form.errors.items %}
                                {{ error }}
                            {% endfor %}
                        {% else %}
                            {{ msg }}
                        {% endif %}
                    </div>
                     <div class="auto-box marb38">
                        <a class="fr" href="{% url 'users:forgetpwd' %}">忘记密码？</a>
                     </div>
                     <input class="btn btn-green" id="jsLoginBtn" type="submit" value="立即登录 > " />
                    {% csrf_token %}
                </form>
                <p class="form-p">没有在线网帐号？<a href="{% url 'users:register' %}">[立即注册]</a></p>
            </div>
        </div>
    </div>
</section>
{% endblock %}
